package com.example.modelfunction.shrio.usermanager.permission;

import org.apache.shiro.authz.Permission;
import org.apache.shiro.authz.permission.RolePermissionResolver;

import java.util.Arrays;
import java.util.Collection;

public class MyRolePermissionResolver implements RolePermissionResolver {
    @Override
    public Collection<Permission> resolvePermissionsInRole(String s) {
        if(s.contains("role1")){
            return Arrays.asList((Permission) new UrlPermission("/admin"));
        }
        return null;
    }
}
